package com.tedu.ivos.dictoption.controller;


import com.tedu.ivos.base.response.JsonResult;
import com.tedu.ivos.dictoption.pojo.dto.DictOptionQuery;
import com.tedu.ivos.dictoption.pojo.vo.DictOptionVO;
import com.tedu.ivos.dictoption.service.DictOptionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@Api(tags = "字典选项管理")
@RequestMapping("/v1/dictOption")
public class DictOptionController {

    @Autowired
    DictOptionService dictOptionService;

    @ApiOperation(value = "查询字典选项数据")
    @GetMapping("/select")
    public JsonResult selectDictOption(DictOptionQuery dictOptionQuery){
        log.info("查询字典选项数据，参数：{}",dictOptionQuery);
        List<DictOptionVO> list=dictOptionService.selectDictOption(dictOptionQuery);
        return JsonResult.ok(list);
    }
}
